using System;
using System.Collections.Generic;
using System.Text;

namespace Test {
	class BaseConv {

		static void MainX() {

			//string bas="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
			string bas="EdHvgSGc1fkIQKrzo6LhUqu3TsPb0wB2OVjX4lAyFZ7x8RWNaYe9iMDmCnJp5t";
			for(ulong i=49900;i<50000;i++)
			{
				Console.WriteLine(Convert(i,bas));
			}


		}

		public static string Convert(ulong i,string bas) {
			List<char> chars=new List<char>();
			ulong len=(ulong)bas.Length;
			ulong rem=i;
			int mod=0;
			do
			{
				mod=(int)(rem%len);
				rem/=len;
				chars.Add(bas[mod]);
			} while(rem!=0);
			char[] arr=chars.ToArray();
			Array.Reverse(arr);
			return new string(arr);
		}

	}
}
